//
//  ViewController.m
//  YQLoginDemo
//
//  Created by weixb on 2017/3/24.
//  Copyright © 2017年 YQHD. All rights reserved.
//

#import "ViewController.h"
#import <YQTools.h>
#import "YQShareSDKManager+Share.h"
#import "YQShareSDKManager+Login.h"

@interface ViewController ()

@property (weak, nonatomic) IBOutlet UIButton *wechatBtn;
@property (weak, nonatomic) IBOutlet UIButton *sinaWeiboBtn;
@property (weak, nonatomic) IBOutlet UIButton *qqBtn;
@property (weak, nonatomic) IBOutlet UIButton *twitterBtn;
@property (weak, nonatomic) IBOutlet UIButton *facebookBtn;

@end

@implementation ViewController

#pragma mark - life cycle
/* 1.viewDidAppear里面做Notification的监听之类的事情
 2.属性的初始化，则交给getter去做
 */
- (void)viewDidLoad {
    [super viewDidLoad];
    [self layoutPageSubviews];
}

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    [_qqBtn yq_touchUpInside:^{
        [YQShareSDKManager qqLogin:^(SSDKUser *user) {
            
        }];
    }];
    [_wechatBtn yq_touchUpInside:^{
        [YQShareSDKManager wechatLogin:nil];
    }];
    [_sinaWeiboBtn yq_touchUpInside:^{
        [YQShareSDKManager sinaWeiboLogin:nil];
    }];
    
    [_facebookBtn yq_touchUpInside:^{
        [YQShareSDKManager shareByText:@"" images:nil urlStr:nil title:@""];
    }];
    
}

/* add constraints */
- (void)layoutPageSubviews {
    
}


@end
